import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/Home/Home' //首页
import Destination from '@/pages/Destination/Destination' //目的地
import TourismStrategy from '@/pages/TourismStrategy/TourismStrategy' //旅游攻略
import GoJourney from '@/pages/GoJourney/GoJourney' //去旅行
import Tickets from '@/pages/Tickets/Tickets' //机票火车票
import BookHotel from '@/pages/BookHotel/BookHotel' //订酒店

import Login from '@/pages/Login/Login'


Vue.use(Router)

export default new Router({
    routes: [{
            path: '/home',
            name: 'Home',
            component: Home,
            children: []
        },
        {
            path: '/destination',
            name: 'Destination',
            component: Destination,
            children: []
        },
        {
            path: '/tourismstrategy',
            name: 'TourismStrategy',
            component: TourismStrategy,
            children: []
        },
        {
            path: '/gojourney',
            name: 'GoJourney',
            component: GoJourney,
            children: []
        },
        {
            path: '/tickets',
            name: 'Tickets',
            component: Tickets,
            children: []
        },
        {
            path: '/bookhotel',
            name: 'BookHotel',
            component: BookHotel,
            children: []
        },
        {
            path: '/login',
            name: 'Login',
            component: Login,
        },
        {
            path: '/',
            redirect: '/home'
        },
        // {
        //     path: '/',
        //     redirect: '/test'
        // },
        {
            path: '/test',
            name: 'Test',
            component: () =>
                import ('@/pages/Test/test')
        }

    ]
})